import projectRouters from './project/index';


// (静态路由)
export const staticRouter = [

    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        redirect: '/dashboard',
        name: '首页',
        children: [
            {
                path: 'dashboard',
                component: () => import("@/views/home/index.vue"),
            },
            {
                path: "/403",
                name: "403",
                component: () => import("@/components/ErrorMessage/403.vue"),
                meta: {
                    title: "403页面"
                }
            },
            {
                path: "/404",
                name: "404",
                component: () => import("@/components/ErrorMessage/404.vue"),
                meta: {
                    title: "404页面"
                }
            },
            {
                path: "/500",
                name: "500",
                component: () => import("@/components/ErrorMessage/500.vue"),
                meta: {
                    title: "500页面"
                }
            }
        
        ]
    },
    {
        path: "/login",
        name: "login",
        meta: {
            title: "登录页面"
        },
        component: () => import("@/views/login/index.vue"),
    },




]

/**
 * notFoundRouter(找不到路由)
 */
export const notFoundRouter = {
    path: "/:pathMatch(.*)*",
    name: "notFound",
    redirect: { name: "404" }
};


// export const routerArray = [
//     ...staticRouter,
//     ...errorRouter,
//     ...systemRouters,
//     ];

//异步挂载的路由
//动态需要根据权限加载的路由表 
export const asyncRouterMap = [...projectRouters]